<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<f:view>
	<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets">
		<head>
			<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
			<title>Insert title here</title>
					<STYLE type="text/css">
<!--
.titre {
background-color:#000000;
color:#FFFFFF;
}
.paire {
background-color:#EFEFEF;
}
.impaire {
background-color:#CECECE;
}
-->
</STYLE>

		</head>
		<body>
		<h:form>
		<h2 style="text-align: center">Bienvenu Admin</h2>
		<table>
			<tr>
				<td><h:commandButton value="Ajouter Un utilisateur" action="selectUser" style="width: 128px"></h:commandButton>   
				
				    <h:commandButton value="Deconnexion" action="Deconnexion" style="width: 128px"></h:commandButton>
				    <h:commandButton value="Supprimer" action="#{FileBo.DeletDataItem}" style="width: 128px" onclick="onload.window"></h:commandButton>
				    </td>
			    
			</tr>
			<tr>
				
				<td><h:dataTable binding="#{FileBo.dataTab}" value="#{UserBo.file}" var="datafile"
					cellspacing="4" width="60%" rowClasses="paire,impaire"
					headerClass="titre" style="width: 600px">
                  
                  <h:column>
                  <f:facet name="header">
     				 <h:outputText value="nameFile" />
    			  </f:facet>
                  <h:outputText value="#{datafile.nameFile}" style="width: 110px" rendered="#{not datafile.editable}"/>
                  <h:inputText value="#{datafile.nameFile}" style="width: 110px" rendered="#{datafile.editable}"/>
                  </h:column>
                  
                  <h:column>
                  <f:facet name="header">
     				 <h:outputText value="pathFile" />
    			  </f:facet>
    			  <h:outputText value="#{datafile.pathFile}" style="width: 110px" rendered="#{not datafile.editable}"/>
                  <h:inputText value="#{datafile.pathFile}" style="width: 110px" rendered="#{datafile.editable}"/>
                  </h:column>
                  
                  <h:column>
                  <f:facet name="header">
     				 <h:outputText value="contentFile" />
    			  </f:facet>
    			  <h:outputText value="#{datafile.contentFile}" style="width: 110px" rendered="#{not datafile.editable}"/>
                  <h:inputText value="#{datafile.contentFile}" style="width: 110px" rendered="#{datafile.editable}"/>
           
                  </h:column>
                   <h:column>
                  <f:facet name="header">
     				 <h:outputText value="Delet" />
    			  </f:facet>
                  <h:selectBooleanCheckbox value="#{datafile.delet}"/>
                  </h:column>
			
       			  
       			  <h:column>
            	  <f:facet name="header">
               		 <h:outputText value="Update" />
            	   </f:facet>
            	   <h:commandLink value="Update" action="#{FileBo.Update}" rendered="#{not datafile.editable}" />
            	   <h:commandLink value="Save" action="#{FileBo.Save}" rendered="#{datafile.editable}" />
            	  
       			  </h:column>
       			   <h:column>
            	  <f:facet name="header">
               		 <h:outputText value="Execut" />
            	   </f:facet>
            	  <h:commandLink value="Execut" action="#{FileBo.getuserFi}" />
       			  </h:column>		
				
				
				</h:dataTable></td>
			</tr>


			<tr>


			</tr>
		</table>
		
	</h:form>
		</body>
		</html>
</f:view>